package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.CommentOclassMapper;
import com.education.wisdom.pojo.CommentOclass;
import com.education.wisdom.service.ICommentOclassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 免费公开课评论 服务层实现
 *
 * @author ruoyi
 * @date 2019-06-17
 */
@Service
public class CommentOclassServiceImpl implements ICommentOclassService {
    @Autowired
    private CommentOclassMapper commentOclassMapper;

    /**
     * 查询免费公开课评论信息
     *
     * @param plId 免费公开课评论ID
     * @return 免费公开课评论信息
     */
    @Override
    public CommentOclass selectCommentOclassById(String plId) {
        return commentOclassMapper.selectCommentOclassById(plId);
    }

    /**
     * 查询免费公开课评论列表
     *
     * @param commentOclass 免费公开课评论信息
     * @return 免费公开课评论集合
     */
    @Override
    public List<CommentOclass> selectCommentOclassList(CommentOclass commentOclass) {
        return commentOclassMapper.selectCommentOclassList(commentOclass);
    }

    /**
     * 新增免费公开课评论
     *
     * @param commentOclass 免费公开课评论信息
     * @return 结果
     */
    @Override
    public int insertCommentOclass(CommentOclass commentOclass) {
        return commentOclassMapper.insertCommentOclass(commentOclass);
    }

    /**
     * 修改免费公开课评论
     *
     * @param commentOclass 免费公开课评论信息
     * @return 结果
     */
    @Override
    public int updateCommentOclass(CommentOclass commentOclass) {
        return commentOclassMapper.updateCommentOclass(commentOclass);
    }

    /**
     * 删除免费公开课评论对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCommentOclassByIds(String ids) {
        return commentOclassMapper.deleteCommentOclassByIds(Convert.toStrArray(ids));
    }

    @Override
    public List<CommentOclass> selectByCatalogId(Integer catalogId) {
        return commentOclassMapper.selectByCatalogId(catalogId);
    }

    @Override
    public List<CommentOclass> selectByType(Map<String, Object> map) {
        return commentOclassMapper.selectByType(map);
    }

    @Override
    public List<CommentOclass> selectByLabeId(Map<String, Object> map) {
        return commentOclassMapper.selectByLabeId(map);
    }

}
